<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>

	<h:panelGrid columns="3">

		<h:outputLabel value="#{appMsg['driver.ajax.action']}" for="ajaxAction" />
		<p:selectBooleanButton id="ajaxAction" value="#{driversView.ajaxAction}" onLabel="Yes" offLabel="No"
			onIcon="ui-icon-check" offIcon="ui-icon-close">
			<p:ajax update=":searchPanel" />
		</p:selectBooleanButton>
		<p:message for="ajaxAction" />

		<h:outputLabel value="#{appMsg['driver.lastname']}" for="lastname" />
		<p:inputText id="lastname" value="#{driverFilterForm.lastname}" label="#{appMsg['driver.lastname']}">
		</p:inputText>
		<p:message for="lastname" />

		<h:outputLabel value="#{appMsg['driver.firstname']}" for="firstname" />
		<p:inputText id="firstname" value="#{driverFilterForm.firstname}" label="#{appMsg['driver.firstname']}">
		</p:inputText>
		<p:message for="firstname" />

		<h:outputLabel value="#{appMsg['driver.age']}" for="age" />
		<p:inputText id="age" value="#{driverFilterForm.age}" label="#{appMsg['driver.age']}">
		</p:inputText>
		<p:message for="age" />

		<h:outputLabel value="#{appMsg['driver.level']}" for="level" />
		<p:selectOneMenu id="level" value="#{driverFilterForm.levelId}" styleClass="extra-border" effect="fade">
			<p:ajax update=":searchPanel :listPanel" listener="#{driversView.search}" disabled="#{!driversView.ajaxAction}"/>
			<f:selectItem itemValue="" itemLabel="" />
			<f:selectItems value="#{levels.list}" var="w" itemLabel="#{w.name}" itemValue="#{w.id}" />
		</p:selectOneMenu>
		<p:message for="level" />

		<h:outputLabel value="#{appMsg['driver.team']}" for="team" />
		<p:selectOneMenu id="team" value="#{driverFilterForm.teamId}" styleClass="extra-border">
			<p:ajax update=":searchPanel :listPanel" listener="#{driversView.search}" disabled="#{!driversView.ajaxAction}"/>
			<f:selectItem itemValue="" itemLabel="" />
			<f:selectItems value="#{teams.list}" var="w" itemLabel="#{w.name}" itemValue="#{w.id}" />
		</p:selectOneMenu>
		<p:message for="team" />

	</h:panelGrid>

</ui:composition>
</html>
